<?php
include("global.inc");
?>
<link href="/css/link.css" rel="stylesheet" type="text/css" />
<link href="/css/head.css" rel="stylesheet" type="text/css" />
<script src="../js/jquery.js"></script>
<?php if($_COOKIE[user_id]){
      $mrs=mysql_query("select m_name,m_sex,city,m_type from member where id='$_COOKIE[user_id]'");
	  $mrow=mysql_fetch_array($mrs);
	  
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="32" colspan="2"><label><img src="/images/logoicon2.gif" alt="三帝贸易网会员登录" width="122" height="32" /></label></td>
      </tr>
    <tr>
      <td colspan="2" align="left" style="padding-left:30px; line-height:22px;">
您好：<font color="blue"><?=$mrow[m_name]?> (<?=$mrow[m_sex]?>)</font>&nbsp;&nbsp;[<a href="/exit.php">退出</a>]<br />
城市：<font color="blue"><?=$mrow[city]?></font><br />
等级：<font color="blue"><?php if($mrow[m_type]==6){?><img src="/images/member.gif" border="0" align="absmiddle" /><?php }else{echo "普通会员";}?></font>&nbsp;&nbsp;<a href="/member/" style="color:red;" target="_blank">进入会员中心</a></td>
  </tr>
    <tr>
      <td colspan="2" align="center"><a href="/member" target="_blank"><img src="/images/login_txt.gif" alt="会员中心" border="0" align="absmiddle" /></a></td>
    </tr>
  </table>
<?php }else{?>
<script language="javascript">
$(function()
{
	$("#btn_img").click(function()
	{
		if($("#logUserName").val()=="")
		{
			alert("请输入用户名!");
			return false;
		}
		else if($("#logPassword").val()=="")
		{
			alert("请输入密码!");
			return false;
		}
		else if($("#c_code").val()=="")
		{
			alert("请输入验证码!");
			return false;		
		}
		else
		{
			return true;
		}
	}
	);
	
	$("#test").click(function()
	{
		$("#img").attr("src","/inc/chk_num.php?new="+Math.random());
	}
	);
}
);


</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <form method="post" action="/login.php" >
    <tr>
      <td height="40" colspan="2"><label><img src="/images/logoicon2.gif" alt="三帝贸易网会员登录" width="122" height="32" /></label></td>
    </tr>
    <tr>
      <td width="28%" height="35" align="right">用户名：</td>
      <td width="72%"><input name="logUserName" type="text" class="input1" id="logUserName" size="19" maxlength="40" /></td>
    </tr>
    <tr>
      <td height="35" align="right">密　码： </td>
      <td><label>
        <input name="logPassword" type="password" class="input1" id="logPassword" size="19" maxlength="40" />
      </label></td>
    </tr>
    <tr>
      <td height="35" align="right">验证码：</td>
      <td><label>
        <input name="c_code" type="text" class="input2" id="c_code" size="6" maxlength="6" />
        &nbsp;<img src="/inc/chk_num.php" name="img" width="80" height="25" align="absmiddle" id="img"/></label></td>
    </tr>
    <tr>
      <td height="30" colspan="2" align="center"><a href="/join/forgot_password.php" target="_blank">找回密码</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="cursor:pointer" name="test" id="test">刷新验证码</a></td>
    </tr>
    <tr>
      <td height="40" colspan="2" align="center">
	  <div class="reg">
	    <input type="image" id="btn_img" src="/images/login.gif" />
	  &nbsp;<a href="/join" target="_blank"><img src="/images/reg.gif" width="89" height="31" border="0" /></a></div></td>
    </tr></form>
</table>
<?php }?>  
